package com.cn.stusy0015.demo0015;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName TestFruit.java
 * @Description
 * @createTime 2023年05月20日 16:44:00
 */
public class TestFruit {
    public static void main(String[] args) {
        Fruit f = new Fruit();
        Scanner sc= new Scanner(System.in);
        for (int i = 0; i < 5; i++) {
            System.out.print("请输入第"+(i+1)+"个水果:");
            String s = sc.next();
            f.addFruit(s);
        }
        System.out.println("排序前：");
        f.show();
        f.sortFruit();
        System.out.println("\n排序后：");
        f.show();
    }
}
